﻿<UserControl x:Class="StockholmsStad.Windows.UI.Modules.Maintenance.Controls.CeremonyValuesControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Grid Margin="15,15,15,15">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="20" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="20" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <GroupBox Header="Alla språk" Grid.Row="0" Grid.Column="0" Padding="10,15,10,10">

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                
                <TextBox x:Name="TextBoxNewLanguage" Grid.Row="0" Grid.Column="0" Margin="0,0,0,5" 
                         KeyUp="TextBoxLanguage_KeyUp" LostFocus="TextBoxLanguage_LostFocus" 
                         Text="{Binding NewLanguage, Path=Name, Mode=TwoWay}" />

                <ListBox x:Name="ListBoxLanguages" Grid.Row="1" Grid.Column="0" Width="120" Height="120"
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         ItemsSource="{Binding AllLanguages, Mode=TwoWay}" DisplayMemberPath="Name"
                         SelectionChanged="ListBoxLanguages_SelectionChanged">
                </ListBox>

                <Button x:Name="ButtonAddLanguage" Content="Lägg till" Grid.Row="0" Grid.Column="2" 
                        IsEnabled="False" Command="{Binding AddLanguageCommand}" />

                <Button x:Name="ButtonChangeLanguage" Content="Ändra" Grid.Row="1" Grid.Column="2" Height="25" Margin="0,0,0,20"
                        IsEnabled="False" Command="{Binding ChangeLanguageCommand}" />

                <Button x:Name="ButtonDeleteLanguage" Content="Ta Bort" Grid.Row="1" Grid.Column="2" Height="25" Margin="0,0,0,80"
                        IsEnabled="False" Command="{Binding DeleteLanguageCommand}" Click="ButtonDeleteLanguage_Click"/>

                <Button x:Name="ButtonNewLanguage" Content="Ny" Grid.Row="1" Grid.Column="2" Height="25" Margin="0,0,0,-40"
                        IsEnabled="False" Click="ButtonNewLanguage_Click" />

                <ListBox x:Name="ListBoxReportLanguages" Grid.Row="1" Grid.Column="3" Width="40" Height="120"
                         IsEnabled="False" Visibility="Hidden"
                         ItemsSource="{Binding AllReportLanguages, Mode=OneWay}" DisplayMemberPath="Name" >
                </ListBox>

            </Grid>
            
        </GroupBox>

        <GroupBox Header="Hjälpmedel" Grid.Row="0" Grid.Column="2" Padding="10,15,10,10">

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <TextBox x:Name="TextBoxSpecialNeeds" Grid.Row="0" Grid.Column="0" Margin="0,0,0,5" 
                         KeyUp="TextBoxSpecialNeeds_KeyUp" LostFocus="TextBoxSpecialNeeds_LostFocus"
                         Text="{Binding NewSpecialNeed, Path=Name, Mode=TwoWay}" />

                <ListBox x:Name="ListBoxSpecialNeeds" Grid.Row="1" Grid.Column="0" Width="120" Height="120" 
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         ItemsSource="{Binding AllSpecialNeeds, Mode=TwoWay}" DisplayMemberPath="Name">
                </ListBox>

                <Button x:Name="ButtonAddSpecialNeed" Content="Lägg till" Grid.Row="0" Grid.Column="2" 
                        IsEnabled="False" Command="{Binding AddSpecialNeedCommand}" />

            </Grid>
        
        </GroupBox>

        <GroupBox Header="Ceremonispråk" Grid.Row="2" Grid.Column="0" Padding="10,15,10,10">
            <Grid>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <Label Grid.Row="0" Grid.Column="0" Content="Alla språk:" />
                <Label Grid.Row="0" Grid.Column="2" Content="Ceremonispråk:" />

                <ListBox x:Name="ListBoxCeremonyAllLanguages" Grid.Row="1" Grid.Column="0" Width="120" Height="120" 
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         SelectionChanged="ListBoxCeremonyAllLanguages_SelectionChanged" 
                         ItemsSource="{Binding AllLanguages, Mode=TwoWay}" DisplayMemberPath="Name">
                </ListBox>

                <Button x:Name="ButtonAddCeremonyLanguage" Content=">>" Grid.Row="1" Grid.Column="1" Width="25" Height="25" 
                Margin="5,0,5,50" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False"
                Command="{Binding AddCeremonyLanguageCommand}" />

                <Button x:Name="ButtonDeleteCeremonyLanguage" Content="&lt;&lt;" Grid.Row="1" Grid.Column="1" Width="25" Height="25" 
                Margin="5,50,5,0" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False"
                Command="{Binding DeleteCeremonyLanguageCommand}" />

                <ListBox x:Name="ListBoxCeremonyLanguages" Grid.Row="1" Grid.Column="2" Width="120" Height="120" 
                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                          ScrollViewer.VerticalScrollBarVisibility="Auto"
                         ItemsSource="{Binding CeremonyLanguages, Mode=TwoWay}" DisplayMemberPath="Name" SelectionChanged="ListBoxCeremonyLanguages_SelectionChanged">
                </ListBox>

            </Grid>
        </GroupBox>

        <GroupBox Header="Vigselbevisspråk" Grid.Row="2" Grid.Column="2" Padding="10,15,10,10">
            <Grid>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <Label Grid.Row="0" Grid.Column="0" Content="Alla språk:" />
                <Label Grid.Row="0" Grid.Column="2" Content="Vigselbevisspråk:" />
                
                <ListBox x:Name="ListBoxCertificateAllLanguages" Grid.Row="1" Grid.Column="0" Width="120" Height="120" 
                         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         SelectionChanged="ListBoxCertificateAllLanguages_SelectionChanged"
                         ItemsSource="{Binding AllLanguages, Mode=TwoWay}" DisplayMemberPath="Name">
                </ListBox>

                <Button x:Name="ButtonAddCertificateLanguage" Content=">>" Grid.Row="1" Grid.Column="1" Width="25" Height="25" 
                Margin="5,0,5,50" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False"
                Command="{Binding AddCertificateLanguageCommand}" />

                <Button x:Name="ButtonDeleteCertificateLanguage" Content="&lt;&lt;" Grid.Row="1" Grid.Column="1" Width="25" Height="25" 
                Margin="5,50,5,0" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False"
                Command="{Binding DeleteCertificateLanguageCommand}" />

                <ListBox x:Name="ListBoxCertificateLanguages" Grid.Row="1" Grid.Column="2" Width="120" Height="120" 
                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                          ScrollViewer.VerticalScrollBarVisibility="Auto"
                          SelectionChanged="ListBoxCertificateLanguages_SelectionChanged"
                          ItemsSource="{Binding CertificateLanguages, Mode=TwoWay}" DisplayMemberPath="Name">
                </ListBox>

            </Grid>
        </GroupBox>
    </Grid>
    
</UserControl>
